﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using eManager.Domain;
using eManager.web.Infrastructure;

namespace eManager.web.Controllers
{
    public class HomeController : Controller
    {
        private IDepartementDataSource _db=  new DepartementDb();

        public HomeController()
        {
            
        }
        private HomeController(IDepartementDataSource db)
        {
            _db = db;
        }
        public ActionResult Index()
        {
            var allDepartements = _db.Departements;
            return View(allDepartements);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public string sayHello()
        {
            return "Hello world";
        }
    }
}
